package com.cloudbroker.bcs.csvc.lightinvesting.facade.service.aspect;

import com.alibaba.fastjson.JSON;
import com.cloudbroker.bcs.common.model.SessionIdentity;
import com.cloudbroker.bcs.platform.ltb.bizapi.service.base.vo.BrokerVO;
import org.apache.commons.lang3.StringUtils;

/**
 * 跟投用户登录时缓存数据
 * */
public class UserCache extends SessionIdentity {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 1L;

    protected  BrokerVO brokerVO;
    protected  String user_type;
    protected String access_token;//用户中心的user_token
    protected String middle_user_token;//领投宝中台的user_token
    protected String account_content;//资金账号

    protected String isCapitalAccount="0";//是否是资金账户(0:非资金账户，1：资金账户）

    protected String password;//密码
    protected String password_type;

    public String getUser_type() {
        return user_type;
    }

    public void setUser_type(String user_type) {
        this.user_type = user_type;
    }

    public static UserCache fromStringInfo(String string) {
        if (StringUtils.isNotBlank(string)) {
            return JSON.parseObject(string, UserCache.class);
        }
        return null;
    }

    public BrokerVO getBrokerVO() {
        return brokerVO;
    }

    public void setBrokerVO(BrokerVO brokerVO) {
        this.brokerVO = brokerVO;
    }

    public String getAccess_token() {
        return access_token;
    }

    public void setAccess_token(String access_token) {
        this.access_token = access_token;
    }

    public String getAccount_content() {
        return account_content;
    }

    public void setAccount_content(String account_content) {
        this.account_content = account_content;
    }

    public String getMiddle_user_token() {
        return middle_user_token;
    }

    public void setMiddle_user_token(String middle_user_token) {
        this.middle_user_token = middle_user_token;
    }

    public String getIsCapitalAccount() {
        return isCapitalAccount;
    }

    public void setIsCapitalAccount(String isCapitalAccount) {
        this.isCapitalAccount = isCapitalAccount;
    }


    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPassword_type() {
        return password_type;
    }

    public void setPassword_type(String password_type) {
        this.password_type = password_type;
    }
}


